import request from '../utils/Request';

export function sendMsg(data) {
  return request(`captchaSMS/${data.phone}`);
}

export function register(data) {
  return request('system/user/profile/mregister', {
    body: data,
    method: 'PUT',
    loading: true,
  });
}

export function login(data) {
  return request('mlogin', {
    body: data,
    method: 'POST',
    loading: true,
  });
}

export function resetPassword(data) {
  return request('system/user/profile/updatePwd', {
    body: data,
    method: 'PUT',
    loading: true,
  });
}

// 找回密码
export function mretrievePwd(data) {
  return request('system/user/profile/mretrievePwd', {
    body: data,
    method: 'PUT',
    loading: true,
  });
}

// 协议
export async function getProtocol(pid) {
  return request(`system/setInfo/${pid}`);
}
